package cn.wikiflyer.beikang.view;

import cn.wikiflyer.beikang.R;
import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

/** @author maizi
 * CustomView.java
 * 2015年6月2日
 * 自定义的弹出框
 */
public class CustomView extends Dialog {
	
	private Context context;
	private TextView tv_ok;

	public CustomView(Context context, int theme) {
		super(context, theme);
		this.setCanceledOnTouchOutside(false);
	}

	public CustomView(Context context) {
		super(context);
		this.context = context;
	}
	
	/** 设置自定义的View
	 */
	public void setCustomDialog(){
		View mView = LayoutInflater.from(context).inflate(R.layout.custom_diaog, null);
		tv_ok = (TextView) mView.findViewById(R.id.textView_ok);
		super.setContentView(mView);
	}
	/** @param listener1 设置按钮监听
	 */
	public void setClickListener(View.OnClickListener listener1){
		tv_ok.setOnClickListener(listener1);
	}

}
